

from instance_test import *

user1 = User(id=1, name="张三", age=18, sex="男", addr="北京", school="清华", cls="数学")
user2 = User(id=2, name="李四", age=20, sex="女", addr="上海", school="北大", cls="英语")
sc = SingletonClass()
sc.add_user(1,user1)
sc.add_user(2,user2)
sc2 = SingletonClass()
print("==========取内存数据信息==============")
print(sc2.get_user(1).__dict__)
print(sc2.get_user(2).__dict__)
print(sc2.get_user(3))